<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition>

    <p:dialog header="Criar cliente" widgetVar="create_client_phone" resizable="false" showEffect="clip" hideEffect="clip" modal="true" position="top" width="440">
        <h:panelGrid id="panel_create_client_phone" columns="2" style="margin-bottom:10px">

            <h:outputLabel value="Nome:"/>
            <h:inputText value="#{clientDashboardMBean.createClientPhone.name}" size="45" maxlength="45"/>

            <h:outputLabel value="Telefone:"/>
            <h:inputText value="#{clientDashboardMBean.createClientPhone.phone}" size="12" maxlength="12" />
        </h:panelGrid>
        <br/>
        <p:commandButton value="Confirmar" update="growl, pnlClientPhone" actionListener="#{clientDashboardMBean.createClientPhone}" oncomplete="create_client_phone.hide();"/>
        <p:commandButton value="Cancelar" oncomplete="create_client_phone.hide();"/>
    </p:dialog>

    <p:dialog header="Editar cliente" widgetVar="edit_client_phone" resizable="false" showEffect="clip" hideEffect="clip" modal="true" position="top" width="440">
        <h:panelGrid id="panel_edit_client_phone" columns="2" style="margin-bottom:10px">

            <h:outputLabel value="Nome:"/>
            <h:inputText value="#{clientDashboardMBean.selectedClientPhone.name}" size="45" maxlength="45"/>

            <h:outputLabel value="Telefone:"/>
            <h:inputText value="#{clientDashboardMBean.selectedClientPhone.phone}" size="12" maxlength="12" />

        </h:panelGrid>
        <br/>
        <p:commandButton value="Confirmar" update="growl, pnlClientPhone" actionListener="#{clientDashboardMBean.updateClientPhone}" oncomplete="edit_client_phone.hide();"/>
        <p:commandButton value="Cancelar" oncomplete="edit_client_phone.hide();"/>
    </p:dialog>
    
</ui:composition>
</html>